package com.blockmeta.bbs.overallserviceapplication.pojo;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.List;

/**
 * Created by author on 2018/11/2.
 */

public class SearchBannerPOJO {

    private String subtitles;
    private List<BannerBean> banner;

    public String getSubtitles() {
        return subtitles;
    }

    public void setSubtitles(String subtitles) {
        this.subtitles = subtitles;
    }

    public List<BannerBean> getBanner() {
        return banner;
    }

    public void setBanner(List<BannerBean> banner) {
        this.banner = banner;
    }

    public static class BannerBean {
        /**
         * list : [{"deeplink":"","logo":"https://s2.coinmarketcap.com/static/img/coins/32x32/1.png","title":"BTC"},{"deeplink":"","logo":"https://s2.coinmarketcap.com/static/img/coins/32x32/1027.png","title":"ETH"},{"deeplink":"","logo":"https://s2.coinmarketcap.com/static/img/coins/32x32/52.png","title":"XRP"},{"deeplink":"","logo":"https://s2.coinmarketcap.com/static/img/coins/32x32/1831.png","title":"BCH"},{"deeplink":"","logo":"https://s2.coinmarketcap.com/static/img/coins/32x32/1765.png","title":"EOS"},{"deeplink":"","logo":"https://s2.coinmarketcap.com/static/img/coins/32x32/512.png","title":"XLM"},{"deeplink":"","logo":"https://s2.coinmarketcap.com/static/img/coins/32x32/2.png","title":"LTC"},{"deeplink":"","logo":"https://s2.coinmarketcap.com/static/img/coins/32x32/2010.png","title":"ADA"},{"deeplink":"","logo":"https://s2.coinmarketcap.com/static/img/coins/32x32/825.png","title":"USDT"},{"deeplink":"","logo":"https://s2.coinmarketcap.com/static/img/coins/32x32/328.png","title":"XMR"}]
         * type : 币种
         */

        private String type;
        private List<ListBean> list;

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public List<ListBean> getList() {
            return list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }


        public static class ListBean implements MultiItemEntity {
            /**
             * deeplink :
             * logo : https://s2.coinmarketcap.com/static/img/coins/32x32/1.png
             * title : BTC
             */

            private String deeplink;
            private String logo;
            private String title;
            private String type;

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public String getDeeplink() {
                return deeplink;
            }

            public void setDeeplink(String deeplink) {
                this.deeplink = deeplink;
            }

            public String getLogo() {
                return logo;
            }

            public void setLogo(String logo) {
                this.logo = logo;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public static final int TypeTag1 = 1;
            public static final int TypeTag2 = 2;

            @Override
            public int getItemType() {
                if ("币种".equals(this.type) || "项目".equals(this.type)) {
                    return TypeTag1;
                }
                if ("交易所".equals(this.type)) {
                    return TypeTag1;
                }
                return TypeTag2;
            }
        }
    }
}
